package com.zodiac.alioth.common.api;

/**
 * Created by well on 2014/7/29.
 */
public class ApiRequestKey {

    private String apiName;

    private String apiVersion;

    public String getApiName() {
        return apiName;
    }

    @Override
    public String toString() {
        return "ApiRequestKey{" +
                "apiName='" + apiName + '\'' +
                ", apiVersion='" + apiVersion + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ApiRequestKey)) {
            return false;
        }

        ApiRequestKey that = (ApiRequestKey) o;

        if (!apiName.equals(that.apiName)) {
            return false;
        }
        if (!apiVersion.equals(that.apiVersion)) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = apiName.hashCode();
        result = 31 * result + apiVersion.hashCode();
        return result;
    }

    public void setApiName(String apiName) {
        this.apiName = apiName;
    }

    public String getApiVersion() {
        return apiVersion;
    }

    public void setApiVersion(String apiVersion) {
        this.apiVersion = apiVersion;
    }


}
